package com.gosuncn.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@Slf4j
@Order(-1)
public class MyInitializingBean implements InitializingBean {


    @PostConstruct
    private void test(){
        log.info("PostConstruct执行");
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("InitializingBean 启动成功");
    }
}
